﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace HZYProject.Domain
{
    /// <summary>
    /// 权限表
    /// </summary>
    public class Module
    {
        /// <summary>
        /// 主键
        /// </summary>
        [Key]
        public Guid ModuleID { get; set; }

        [StringLength(50)]
        public string Name { get; set; }
        /// <summary>
        /// 权限分类Id
        /// </summary>
        public int ModuleCategoryId { get; set; }
        /// <summary>
        /// action/controller
        /// </summary>
        [StringLength(50)]
        public string PageKey { get; set; }

        [StringLength(50)]
        public string PageUrl { get; set; }
        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; set; }
        /// <summary>
        /// 资源类型
        /// </summary>
        public ModuleType ModuleType { get; set; }

        public virtual ModuleCategory ModuleCategory { get; set; }

        public virtual ICollection<Role> Roles { get; set; }
    }
    public enum ModuleType
    {
        Menu=1,
        Button=2

    }
}
